package com.accp.demo.controller.stock;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.accp.demo.pojo.PageBean;
import com.accp.demo.pojo.stock.StockReportoryDetail;
import com.accp.demo.service.stock.StockReportoryDetailService;

@Controller
@RequestMapping("/StockReportoryDetail")
public class StockReportoryDetailController {
	@Autowired
	private  StockReportoryDetailService stockReportoryDetailService;
	
	
	@RequestMapping(value="/findByPage",method=RequestMethod.POST)
	@ResponseBody
	public PageBean findByPage(Map<String,Object> map){
		System.out.println("进入库存台账分页servlet:");
	
		return stockReportoryDetailService.findByPage(map);
	}
	
	@RequestMapping("/insert")
	public void insert(StockReportoryDetail stockReportoryDetail){
		System.out.println("进入库存台账新增servlet:");
		stockReportoryDetailService.insert(stockReportoryDetail);
	}
	
	@RequestMapping("/delete")
	public void delete(StockReportoryDetail stockReportoryDetail){
		System.out.println("进入库存台账删除servlet:");
		stockReportoryDetailService.insert(stockReportoryDetail);
	}
	@RequestMapping("/update")
	public void update(StockReportoryDetail stockReportoryDetail){
		System.out.println("进入库存台账删除servlet:");
		stockReportoryDetailService.update(stockReportoryDetail);
	}
}
